package com.ziyueyuwen.xiniao.bean.report;

import com.alibaba.fastjson.JSONObject;
import com.ziyueyuwen.xiniao.enums.HomeworkStatusEnum;
import com.ziyueyuwen.xiniao.enums.ReportInOutEnum;
import com.ziyueyuwen.xiniao.enums.ReportLevelEnum;
import com.ziyueyuwen.xiniao.handler.common.Json2StringHandler;
import tk.mybatis.mapper.annotation.ColumnType;


import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;

public class ZyStudentLessonReport {
    @Id
    @GeneratedValue(generator = "JDBC")
    private Integer id;

    @Column(name = "student_account")
    private String studentAccount;

    @Column(name = "course_id")
    private Integer courseId;

    @Column(name = "class_id")
    private Integer classId;

    @Column(name = "lesson_index")
    private Integer lessonIndex;

    @Column(name = "lesson_id")
    private Integer lessonId;

    /**
     * 课前预习 连续上课（开课前20小时）；每周一次（开课前2天）
     */
    @Column(name = "preview")
    private Boolean preview;

    /**
     * 推送本节课作业 课程结束10分钟，，标注截止日期是下节课上课时间
     */
    @Column(name = "homework")
    private HomeworkStatusEnum homework;

    /**
     * 推送本节课课程总结  课程结束10分钟
     */
    @Column(name = "summarize")
    private Boolean summarize;

    /**
     * 推送本节课回放链接  课程结束后30分钟
     */
    @Column(name = "replay")
    private Boolean replay;

    /**
     * 课后拓展
     */
    @Column(name = "expansion")
    private Boolean expansion;

    /**
     * 分数
     */
    @Column(name = "score")
    private Integer score;
    /**
     * 奖杯数
     */
    @Column(name = "award")
    private Integer award;

    @Column(name = "if_has_note")
    private Boolean ifHasNote;

    @Column(name = "level")
    private ReportLevelEnum level;

    @Column(name = "attendance")
    private ReportInOutEnum attendance;

    @Column(name = "class_test_count")
    private Integer classTestCount;

    @ColumnType(column = "per_rate",typeHandler = Json2StringHandler.class)
    private JSONObject perRate;

    @Column(name = "average_rate")
    private String averageRate;

    @Column(name = "report")
    private String report;

    @Column(name = "create_time")
    private Date createTime;

    public Integer getId() {
        return id;
    }

    public ZyStudentLessonReport setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getStudentAccount() {
        return studentAccount;
    }

    public ZyStudentLessonReport setStudentAccount(String studentAccount) {
        this.studentAccount = studentAccount == null ? null : studentAccount.trim();
        return this;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public ZyStudentLessonReport setCourseId(Integer courseId) {
        this.courseId = courseId;
        return this;
    }

    public Integer getClassId() {
        return classId;
    }

    public ZyStudentLessonReport setClassId(Integer classId) {
        this.classId = classId;
        return this;
    }

    public Integer getLessonIndex() {
        return lessonIndex;
    }

    public ZyStudentLessonReport setLessonIndex(Integer lessonIndex) {
        this.lessonIndex = lessonIndex;
        return this;
    }

    public Integer getLessonId() {
        return lessonId;
    }

    public ZyStudentLessonReport setLessonId(Integer lessonId) {
        this.lessonId = lessonId;
        return this;
    }

    public Boolean getPreview() {
        return preview;
    }

    public ZyStudentLessonReport setPreview(Boolean preview) {
        this.preview = preview;
        return this;
    }

    public HomeworkStatusEnum getHomework() {
        return homework;
    }

    public ZyStudentLessonReport setHomework(HomeworkStatusEnum homework) {
        this.homework = homework;
        return this;
    }

    public Boolean getSummarize() {
        return summarize;
    }

    public ZyStudentLessonReport setSummarize(Boolean summarize) {
        this.summarize = summarize;
        return this;
    }

    public Boolean getReplay() {
        return replay;
    }

    public ZyStudentLessonReport setReplay(Boolean replay) {
        this.replay = replay;
        return this;
    }

    public Boolean getExpansion() {
        return expansion;
    }

    public ZyStudentLessonReport setExpansion(Boolean expansion) {
        this.expansion = expansion;
        return this;
    }

    public Integer getScore() {
        return score;
    }

    public ZyStudentLessonReport setScore(Integer score) {
        this.score = score;
        return this;
    }

    public Integer getAward() {
        return award;
    }

    public ZyStudentLessonReport setAward(Integer award) {
        this.award = award;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public ZyStudentLessonReport setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Boolean getIfHasNote() {
        return ifHasNote;
    }

    public ZyStudentLessonReport setIfHasNote(Boolean ifHasNote) {
        this.ifHasNote = ifHasNote;
        return this;
    }

    public ReportLevelEnum getLevel() {
        return level;
    }

    public ZyStudentLessonReport setLevel(ReportLevelEnum level) {
        this.level = level;
        return this;
    }

    public ReportInOutEnum getAttendance() {
        return attendance;
    }

    public void setAttendance(ReportInOutEnum attendance) {
        this.attendance = attendance;
    }

    public String getReport() {
        return report;
    }

    public void setReport(String report) {
        this.report = report;
    }

    public Integer getClassTestCount() {
        return classTestCount;
    }

    public void setClassTestCount(Integer classTestCount) {
        this.classTestCount = classTestCount;
    }

    public JSONObject getPerRate() {
        return perRate;
    }

    public void setPerRate(JSONObject perRate) {
        this.perRate = perRate;
    }

    public String getAverageRate() {
        return averageRate;
    }

    public void setAverageRate(String averageRate) {
        this.averageRate = averageRate;
    }
}